<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // promise是解决回调地域的
   /*  axios({
      method: 'post',
      url:'xxx',
      data: {page:1 ,size: 10}
    }).then(res=> {

    }).catch(()=>{

    }) */
  //  async 和 await是为了简化 promise.then.catch操作
  //  async function fn(){
  //   await axios({
  //     method: 'post',
  //     url:'xxx',
  //     data: {page:1 ,size: 10}
  //   })
  //  }

  async getUserInfo({ commit }) {
    // 发送请求,
   reqGetUserInfo().then(res=> {
    console.log(res.data.userId);
    return reqGetUserDetailById(res.data.userId)
   }).then(res=>{
   })
    
  },
    
  </script>
</body>
</html>